/*
 * motion_state.hpp
 *
 *  Created on: 31.03.2011
 *      Author: inkooboo
 */

#ifndef _CORE_MOTION_STATE_HPP_
# define _CORE_MOTION_STATE_HPP_

# include "types.hpp"

# include "scene_node.hpp"

# include <LinearMath/btMotionState.h>
# include <LinearMath/btTransform.h>

# include <boost/shared_ptr.hpp>

class motion_state_t : public btMotionState
{
public:

    motion_state_t(const world_transform_t &init_pos, boost::shared_ptr<scene_node_t> &scene_node);

    virtual ~motion_state_t();

    virtual void getWorldTransform(btTransform &worldTrans) const; /*override*/

    virtual void setWorldTransform(const btTransform &worldTrans); /*override*/

    void setKinematicPos(const btTransform &currentPos);

private:
    world_transform_t position_;
    boost::shared_ptr<scene_node_t> scene_node_;
};


#endif /* _CORE_MOTION_STATE_HPP_ */
